Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator: Customizable Certificate Configuration #5944

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhzhuang-zju
Copy link
Contributor

@zhzhuang-zju zhzhuang-zju commented Dec 12, 2024

What type of PR is this?
/kind feature
/kind api-change

What this PR does / why we need it:
This PR introduces CertConfig to the Karmada API, thereby providing karmada-operator with the capability to customize the certificate's validity period and PublicKeyAlgorithm.
For example, if the relevant configuration for CR karmada is as follows:

customCertificate:
  certConfig:
    expiry: 365
    notAfter: 2026-01-01T00:00:00Z
    publicKeyAlgorithm: ECDSA

Then the generated certificate is as follows:

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1174342019010031212 (0x104c19d827e86e6c)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN = karmada
        Validity
            Not Before: Jan 1 00:00:00 2024 GMT
            Not After : Jan  1 00:00:00 2025 GMT
        Subject: O = system:masters, CN = system:admin
        Subject Public Key Info:
            Public Key Algorithm: id-ecPublicKey
                Public-Key: (256 bit)

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmada-operator`: introduces `CertConfig` to the `Karmada` API, thereby providing `karmada-operator` with the capability to customize the certificate's validity period and PublicKeyAlgorithm.

@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Dec 12, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign poor12, rainbowmango for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 12, 2024
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 49.15254% with 30 lines in your changes missing coverage. Please review.

Project coverage is 48.16%. Comparing base (8457cd2) to head (03aad2b).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
operator/pkg/tasks/init/cert.go 17.64% 13 Missing and 1 partial ⚠️
operator/pkg/init.go 0.00% 9 Missing ⚠️
operator/pkg/apis/operator/v1alpha1/defaults.go 81.25% 2 Missing and 1 partial ⚠️
operator/pkg/certs/certs.go 81.25% 2 Missing and 1 partial ⚠️
operator/pkg/tasks/init/upload.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5944      +/-   ##
==========================================
+ Coverage   48.10%   48.16%   +0.05%     
==========================================
  Files         663      664       +1     
  Lines       54769    54851      +82     
==========================================
+ Hits        26349    26421      +72     
- Misses      26711    26712       +1     
- Partials     1709     1718       +9     
Flag Coverage Δ
unittests 48.16% <49.15%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants